package com.we823.cms.model.extension;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.we823.cms.model.BaseModelWithDate;

@Entity
@Table(name="ex_product_category")
public class ProductCategory extends BaseModelWithDate<Integer> {

	private static final long serialVersionUID = -7286843124022296552L;
	
	@Transient
	private ProductCategory parent;
	@Column(name = "parent_id")
	private int parentId;
	
	private String name;
	private String description;
	private Integer orderid=0;
	
	@Transient
	List<ProductCategory> childs = new ArrayList<>();
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Integer getOrderid() {
		return orderid;
	}
	public void setOrderid(Integer orderid) {
		this.orderid = orderid;
	}
	public List<ProductCategory> getChilds() {
		return childs;
	}
	public void setChilds(List<ProductCategory> childs) {
		this.childs = childs;
	}
	public ProductCategory getParent() {
		return parent;
	}
	public void setParent(ProductCategory parent) {
		this.parent = parent;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
}
